﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.IEnumerable<GabageFactory.Models.Factory>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	公司列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <% using (Html.BeginForm("Index", "Factory", FormMethod.Get))
    {%>


    <div class="search_bar">
        <span class="left_s"></span>
        <label>公司名称：</label>
        <input type="text" name="name" size="15" maxlength="50"/>
		<input type="submit" value="搜索" />
    </div>


    <%} %>

    <p class="sys_create_btn">
        <%= Html.ActionLink("创建公司", "Create") %>
    </p>

    <table class="style_table2" cellspacing="0" cellpadding="0" width="100%" align="center" border="0" style="margin-top:20px">
       <tr>
    	    <th style="width:50px; text-align:center;">编号</th>
    	    <th>公司名称</th>
    	    <th>创建时间</th>
		    <th>修改时间</th>
		    <th style="width:100px; text-align:center;">操作</th>
	    </tr>
        <% foreach (var item in Model) { %>
	    <tr>
	        <td align="center"  height="20"><%= item.Id %></td>
		    <td> <%= item.Name %></td>
		    <td> <%= item.CreateTime %></td>
            <td> <%= item.ModifyTime %></td>
		    <td align="center">
                <%= Html.ActionLink("编辑", "Edit", new { id=item.Id }) %> |
                <%= Html.ActionLink("删除", "Delete", new { id = item.Id }, new { onclick=@"return confirm('确定删除公司" + item.Name + @"吗？');"})%>
            </td>
        </tr>
        <%} %>
    </table>

    

</asp:Content>